package com.juyu.miliao.scheduler.dao.mysql;

import com.juyu.miliao.scheduler.domin.FindDynamicInfo;
import com.juyu.miliao.scheduler.domin.FindDynamicSourceInfo;
import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author xuanqicheng
 */
@Repository
public class FindDynamicDao {

    @Autowired
    private SqlSession sqlSession;

    /**
     * 根据findId 查询数据
     * @param findId
     * @return
     */
    public FindDynamicInfo  getFindDynamicByFindId(int findId){
        return sqlSession.selectOne("selectFindDynamicByFindId",findId);
    }

    public List<FindDynamicSourceInfo> selectFindDynamicSourceInfoByFindId(int findId){

        return sqlSession.selectList("selectFindDynamicSourceInfoByFindId",findId);
    }

}
